![]() 10/19/2020 at 21:08 • Filed to: None | ![]() | ![]() |
One free internet to whoever can figure out what I’m doing*.
*Trying to do... if I knew what I was doing, that would be a good start...
EDIT: Been nailed. Preliminary stages of a clock.
!!! UNKNOWN CONTENT TYPE !!!
![]() 10/19/2020 at 21:15 |
|
It’s a pissed off meter and the president keeps talking.
![]() 10/19/2020 at 21:16 |
|
But that would just peg the needle and then explode.
![]() 10/19/2020 at 21:17 |
|
Using the arduino to make a pulsed output to drive the tachometer to replicate sweet initial D videos without the risk of danger to manifold.
![]() 10/19/2020 at 21:17 |
|
Bluetooth tacho?
![]() 10/19/2020 at 21:17 |
|
Counter to display how many beers you've had...resets to zero when you pee.
![]() 10/19/2020 at 21:17 |
|
HA! No.
![]() 10/19/2020 at 21:17 |
|
Nope.
![]() 10/19/2020 at 21:18 |
|
Now THAT would be some programming prowess.
![]() 10/19/2020 at 21:18 |
|
Connecting an analog gauge to a digital sender.
![]() 10/19/2020 at 21:19 |
|
Kinda, I guess...
![]() 10/19/2020 at 21:20 |
|
Dunno but it should probably go to 11
![]() 10/19/2020 at 21:22 |
|
More to the point, the speedo needs to go to 240 but only goes to 220.
That may or may not be helpful to you.
![]() 10/19/2020 at 21:23 |
|
You can call me Capt. Obvious. To be more specific I would need some actual understanding of what’s going on.
![]() 10/19/2020 at 21:24 |
|
The second hand for a clock/stopwatch?
![]() 10/19/2020 at 21:28 |
|
In it’s present state, pretty much. When it’s done it’ll be 10x slower... But for obvious reasons I don’t want to wait an hour to find out how I screwed up. And then on the other side, the 0-120 part of the speedo will be repurposed into an hour hand.
![]() 10/19/2020 at 22:08 |
|
And here I was thinking some sort of Arduino based thing to make your speedometer do some sort of fancy movement when the car starts.
Now I’m curious. Is the needle moved with some sort of servo or something?
![]() 10/19/2020 at 22:33 |
|
What are you trying to do? Arduinos are friends of mine .
![]() 10/19/2020 at 23:02 |
|
I’ve seen the w123 Mercedes clocks made into desk clocks. I have a spare one, I was thinking about it last year.
![]() 10/20/2020 at 05:33 |
|
Moved with the same stepper motor it normally is, just driven by Arduino now.
![]() 10/20/2020 at 05:36 |
|
Clock. I’ve got the stepper pretty much figured out (just sped up 10x for the time being) as gar as the basic movement goes... Next up, working in a RTC and synchronizing both this and the speedo to it. That’s where I’m projecting to be out my depth. Hopefully I can find some code to copy and modify.
![]() 10/20/2020 at 05:38 |
|
do it
![]() 10/20/2020 at 07:11 |
|
Cool project. Arduino has no internal RTC. Needs something like https://www.sparkfun.com/products/12708 to get one. Read the RTC, set each gauge each 1 se cond loop (ex: delay(1000 -(microseconds-loopStart)); ) would be easy enough. Ard fast enough for that every second. You could calc the execution time of the code you write but that’s not easy. Gonna use a 120mph/kph speedo for hours? Then what for minutes? Arduino clocks are inherently inaccurate; just look at all the clock kits out there that go off after a few days.
I’m working on a recording barometer with ESP8266, RTC, Pro Mini, SD card, serial display etc. Sparkfun has a lot of excellent tutorials for all these parts and how to use them.
![]() 10/20/2020 at 07:19 |
|
Thanks, that ran me down a rabbit hole for awhile. How to detect pee: keypad at toilet to unlock lid, if sea t also raised, assume pee. What if they go pee off the porch? Then how to count beers? Just a button press? What if drinker forgets so it has to be automagic. Facial rec of drinker with beer? Too much for an Ard. Well, you see where this was goin g...
![]() 10/20/2020 at 07:36 |
|
Speedo for hours, Tach for minutes.
I’ve got an RTC on the way. Rough idea was to have it trigger at a certain time and cycle from there. Say wait until midnight, and then start cyc l ing through. Figured that way I can just bottom out the gauges and leave it to set itself. As far as accuracy goes... since it’s coming back to zero every hour (or 12 hours) I think it should be easier to deal with than a standard clock that just keeps turning. As long as it goes off in a consistent direction I should ju st be able to add or subtract a few milliseconds at the start of every new cycle (famous last words). Also, while I hope I can get it fairly accurate , it’s primarily a decoration, so if it turns out inconsistent but pretty I’m not too disappointed.
and now...
Read the RTC, set each gauge each 1 second loop (ex: delay(1000 -(microseconds-loopStart)); )
This would be the next hurdle actually... how do you go about setting up two different loops to run at the same time? Presumably what I’ve got under void loop right now would have to be put under another sub-loop, the same done for the speedo, and void loop set to run both sub-loops rather than any actual steps itself?
^^^ I have no idea if any of that makes sense... I think I have a grasp on the basic concepts, but the language/terminology isn’t even close to there yet...
![]() 10/20/2020 at 07:41 |
|
Pressure sensors under the coaster and seat are probably the best bets, no? For extra accuracy , count pee if someone getting up corresponds to the bathroom door shutting, and only track dramatic INCREASES in coaster pressure, ie refills.
Of course, this is on the basic assumption that drunks shut the door and use coasters... in other words... ... ... ... ...
![]() 10/20/2020 at 07:53 |
|
Uh oh, you’re running down the same rabbit hole! I’m not drunk enough to go any further. :)
![]() 10/20/2020 at 08:07 |
|
Good idea with a midnight reset. Not really necessary with the RTC but garbage collection is always a good consideration. Since yer only using minutes and hours, this thing can take all the loops it wants before doing anything.
I gather you’re trying to use interrupts. In 1st iteration, may be easier to just read and process the RTC in the Arduino. Once that works, rewrite for interrupts. Time is the driving factor, not the gauges . Read RTC, set each gauge each loop() irrespective of previous values. Maybe I’m not understanding how you set the gauges. PWM? Single value to the gauge interface? SPI, CAN or the like?
Recently built a solar panel gimble from 3d printer parts. 2 steppers, 5 LDRs and 4 limit switches. No clock in it. Just a loop to compare 3 LDRs to set Azimuth and Altitude. Side LDRs to reset everything at sunup. Fun to make, wish I could post pics of it.
![]() 10/20/2020 at 08:32 |
|
Right now all I’m doing is driving the existing gauge steppers directly from the Arduino. Not best practice I know, but they supposedly only draw 20mA so it shouldn’t hurt. I think.
I’m sure there’s a way to run through the factory board but that’s beyond me. It’s going to be purely structural when I’m done with it.
As far as setting it, all I’m doing ATM is bottoming out the stepper (It’s got a physical restriction at each end, about 310deg of travel) manually before starting the Arduino.
![]() 10/20/2020 at 08:39 |
|
Huh. I never knew they used stepper motors. Neat.
![]() 10/20/2020 at 09:02 |
|
Cool! Missed that that is a 4-wire connection; looked like 3. What library are you using for the steppers? Just curious. I wrote my own rtns for the solar turntable and used driver boards for the extra power needed https://www.sparkfun.com/products/12779 .
![]() 10/20/2020 at 09:16 |
|
Yup. These exact guys here. https://www.sonceboz.com/slimline-stepper-motor
I’m undecided if I’m going to do anything with the fuel and temp gauges. Might just keep the motors for something else.
![]() 10/20/2020 at 09:22 |
|
Right now I’m just runni ng a modified version of this guy’s code:
https://forum.arduino.cc/index.php?topic=91442.0
B asically, just adjusted the delay intervals and instead of doing one set set of instructions and looping, I’ve got 97 forward steps and 97 reverse looping. And also avoided pin #1 per one commenter’s advice.
![]() 10/20/2020 at 12:40 |
|
Pins D0(rx) and D1(tx) are comms and used by USB. Like for Ctrl-Shft-M console. Powering motors directly, even one as small as these, by the Ard might ruin it as expressed in your forum . Th is tutorial might help https://bildr.org/2012/03/rfp30n06le-arduino/ understanding steppers and DC motors a bit more . But, Arduinos are cheap! I’ve a dozen or more Pro Minis laying around, some with just a pin or 2 burned out. If ya ain’t fryin’, ya ain’t tryin!
![]() 10/20/2020 at 13:31 |
|
Thanks for the link. I... think I’ll be frequenting that site.